package day15.edu;

import org.junit.Test;

// Created: 15/09/2025, ChangJiang Ru
public class StringDemo {
    public static void main(String[] args) {
        String s = "Hello";
        String t = "Hello";

        int a = 1;
        int b = 1;

        t = "hi";

        System.out.println(t);
        System.out.println(s);
        System.out.println(s == t);
        System.out.println(a == b);
    }

    @Test
    public void test1()
    {
        String s1 = "hello";
        String s2 = "hello";

        s1 += "word";

        System.out.println(s2);
        System.out.println(s1);
    }

    @Test
    public void test2()
    {
        String s1 = "hello";
        String s2 = "hello";

        String s3 = s1.replace('l', 'o');

        System.out.println(s1); // s1 = hello
        System.out.println(s2); // s2 = hello
        System.out.println(s3); //
    }
}
